package com.marvels.financial.collection.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.financial.collection.api.CollectionTaskletApi;
/**
 * 催收定时任务
 * @author zhaosa
 *
 */
@RestController
@RequestMapping("financial/collection/batch/api")
public class CollectBathController {
	
	@Autowired
	private CollectionTaskletApi collectionTaskletApi;
	
	@RequestMapping("timingOverDueCollectTask")
	public void timingOverDueCollectTask(){
		MarvelsLogUtil.getInstance().info(">>>>>>催收定时任务controller开始");
		try {
			collectionTaskletApi.process();
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error(">>>>>>催收定时任务controller异常",e);
			throw e;
		}
		MarvelsLogUtil.getInstance().info(">>>>>>催收定时任务controller结束");
	}

}
